package com.heima.mapper;

import com.github.pagehelper.Page;
import com.heima.pojo.entity.Business;
import com.heima.pojo.entity.VendingMachine;
import com.heima.pojo.vo.VendingMachineDetailsVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface VendingMachineMapper {
    @Select("select CONCAT(count(node_id)) from tb_vending_machine where vm_type=#{id}")
    Integer selectNodeId(Long nodeId);

    @Select("select  * from tb_vending_machine where node_id=#{nodeId} ")
    List<VendingMachineDetailsVO> nodeSelectList(String nodeId);

    Page<VendingMachineDetailsVO> SelectPage(String innerCode);

    int add(VendingMachine vm);
}
